doctype html
html
    head
        title mixin混合
    body
        //- 1.混入定义
        //- 混入的定义
        mixin study
            //- 代码块
            p Good good study!
        //- 混入的调用
        +study
        //- 2.传入参数
        mixin study(name,courses)
            p=name
            ul.courses
                each study in courses
                    li=study
        +study("binge",['node','express','pug'])
        //- 3.代码块
        mixin show(time)
            h3=time
            //- 判断是否存在block
            if block
                block
            else
                p no show
        +show('2024-08-14')
        //- 4.传递属性
        mixin attrs(name)
            p&attributes(attributes)#{name}
        +attrs('attrs')(class='p',id="p")
        //- 5.剩余参数
        mixin show(name,...shows)
            p=name
            ul
                each show in shows
                    li=show
        +show('binge','唱歌','跳舞','睡觉')